import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

import 'element-plus/theme-chalk/display.css'
import './static/element.scss'
import './static/main.css'

// 后端接口
import {getRequestInfo,getRequestList,baseApi} from "@/api/api"

// three组件
import ThreeScene from "@/components/three/ThreeScene.vue"
import SnowScene from "@/components/three/SnowScene.vue"
import EarthScene from "@/components/three/EarthScene.vue"

const app = createApp(App)

// 定义全局方法
app.config.globalProperties.getRequestInfo = getRequestInfo
app.config.globalProperties.getRequestList = getRequestList
app.config.globalProperties.baseApi = baseApi


// 全局组件挂载
app.component('ThreeScene', ThreeScene)
app.component('SnowScene', SnowScene)
app.component('EarthScene', EarthScene)

// 定义全局URL
app.config.globalProperties.$apiUrl = baseApi
app.use(router)
app.mount('#app')
